import tkinter as tk
from tkinter import *
import requests
import easygui as g
import tkinter
import time
w = tkinter.Tk()
w.after(3000, w.destroy)
img_gif = tkinter.PhotoImage(file = '2.gif')
label_img = tkinter.Label(w, image = img_gif)
label_img.pack()
def pc():
    global url
    def post():
        r = requests.post(url)
        g.msgbox(r.text)
    def get():
        r = requests.get(url)
        g.msgbox(r.text)
    root = tk.Tk()
    win.geometry('500x300')#大小
    url = g.enterbox("请输入网址")
    txt = Label(root,text='请求方式').pack()
    btn = Button(root, text='post', font=14, relief='flat',bg='#00f5ff',command = post).pack()
    btn = Button(root, text='get', font=14, relief='flat',bg='#00f5ff',command = post).pack()
    root.mainloop()
win = tk.Tk()
win.title('爬取h5代码--黑客零')
win.geometry('500x300')#大小
txt = Label(win,text='爬取网页代码--黑客零').pack()
btn = Button(win, text='点击开始', font=14, relief='flat',bg='#00f5ff',command = pc).pack()
win.mainloop()
